package com.navi.loaddata.core.oracleEntity;

import com.navi.loaddata.core.oracleEntity.array.EtlArrayGlassHstV;
import com.navi.loaddata.core.oracleEntity.cell1.EtlCellComponentHstV;
import com.navi.loaddata.core.oracleEntity.cell2.EtlCell2ChipHstV;
import com.navi.loaddata.core.oracleEntity.cf.EtlCfGlassHstV;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.ReportingPolicy;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * Created by Jay on 2018/3/27.
 */

@Mapper(unmappedTargetPolicy = ReportingPolicy.IGNORE)
public interface EtlGlassHstVMapper {

    EtlGlassHstVMapper INSTANCE = Mappers.getMapper(EtlGlassHstVMapper.class);

    EtlArrayGlassHstV etlGlassHstToArray(EtlGlassHstV glassHstVMapper);
    List<EtlArrayGlassHstV> etlGlassHstToArray(List<EtlGlassHstV> list);


    @Mapping(target = "groupId", source = "lotId")//属性名不一致映射
    EtlCfGlassHstV etlGlassHstToCf(EtlGlassHstV glassHstVMapper);
    List<EtlCfGlassHstV> etlGlassHstToCf(List<EtlGlassHstV> list);

//    @Mapping(target = "componentId",source = "glassId")//属性名不一致映射
    @Mapping(target = "componentEndTime",source = "glassEndTime")//属性名不一致映射
    @Mapping(target = "componentStartTime", source = "glassStartTime")//属性名不一致映射
    @Mapping(target = "groupId", source = "lotId")//属性名不一致映射
    EtlCellComponentHstV etlGlassHstToCell1(EtlGlassHstV glassHstVMapper);
    List<EtlCellComponentHstV> etlGlassHstToCell1(List<EtlGlassHstV> list);

//    @Mapping(target = "chipId",source = "glassId")//属性名不一致映射
    @Mapping(target = "chipEndTime", source = "glassEndTime")//属性名不一致映射
    @Mapping(target = "chipStartTime", source = "glassStartTime")//属性名不一致映射
    @Mapping(target = "groupId", source = "lotId")//属性名不一致映射
    EtlCell2ChipHstV etlGlassHstToCell2(EtlGlassHstV glassHstVMapper);
    List<EtlCell2ChipHstV> etlGlassHstToCell2(List<EtlGlassHstV> list);

}
